package com.wkq.service.impl;

import com.wkq.dao.IPermissionDao;
import com.wkq.domain.Permission;
import com.wkq.service.IPermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class IPermissionServiceImpl implements IPermissionService {

    @Autowired
    private IPermissionDao iPermissionDao;

    @Override
    public List<Permission> findOtherPermission(String roleId) {
        List<Permission> otherPermission = iPermissionDao.findOtherPermission(roleId);
        return otherPermission;
    }

    @Override
    public int save(Permission permission) {
        int flag = iPermissionDao.save(permission);
        return flag;
    }

    @Override
    public List<Permission> findAll() {
        List<Permission> permissionList = iPermissionDao.findAll();
        return permissionList;
    }
}
